<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" Content="text-html; charset=Windows-1252">
<title>TextPopup method</title>
<style>@import url(coUA.css);</style>
<link disabled rel="stylesheet" href="htmlhelp.css">
</HEAD>

<BODY>
<h1>TextPopup method</h1>

<h2>Purpose</h2>

<p>Use the <b>TextPopup</b> method to open a pop-up window.</p>

<p>The instance of the HTML Help ActiveX control that you reference using the <b>TextPopup</b> method does not need to specify a <a href="ocx_commands.htm">command</a>.</p>

<p>This method can be used with either a compiled help (.chm) file or uncompiled HTML files.<p>
 
 <h2>Applies to</h2>
<p>This method is independent of any of the HTML Help ActiveX control commands.</p>


<h2>Syntax</h2>
<p><code>
TextPopup(BSTR <i>pszText</i>, BSTR <i>pszFont</i>, int <i>horzMargins</i>, int <i>vertMargins</i>, COLORREF <i>clrForeground</i>, COLORREF <i>clrBackground</i>)</code></p>

<br>
<table border=1 cellpadding=0 cellspacing=0 width=100%>
<tr valign=top>
<th>
<b>PARAM name</b>
</th>
<th>
<b>Values</b>
</th>
</tr>

<tr valign=top>
<td>
<i>pszText</i>
</td>
<td>
A string variable that specifies the text to display in the pop-up window.
</td>
</tr>

<tr valign=top>
<td>
<i>pszFont</i>
</td>
<td>
A string variable that specifies the following font attributes:
<ul>
<li>Font family</li>
<li>Point size</li>
<li>Character set</li>
<li>Color</li>
<li>Format options</li>
</ul>

<p>The format is as follows:</p>
<p><i>Facename</i>[, <i>point size</i>[, <i>charset</i>[, PLAIN BOLD ITALIC UNDERLINE]]]</p>
<p>The default font settings are: <code>"Helvetica,12,,PLAIN"</code></p> 
</td>
</tr>

<tr valign=top>
<td>
<i>horzMargins</i>
</td>
<td>
An integer that determines, in pixels, the side margins relative to the center of the pop-up window.
</td>
</tr>

<tr valign=top>
<td>
<i>vertMargins</i>
</td>
<td>
An integer that determines, in pixels, the top and bottom margins relative to the center of the pop-up window.
</td>
</tr>

<tr valign=top>
<td>
<i>clrForeground</i>
</td>
<td>
Specifies the color of the text in RRGGBB format. To specify the default text color (black), type <b>-1</b>.
</td>
</tr>

<tr valign=top>
<td>
<i>clrBackground</i>
</td>
<td>
Specifies the background color of the pop-up window in RRGGBB format. To specify the default background color (pale yellow), type <b>-1</b>.
</td>
</tr>
</table>

<h2>Example</h2>

<p><b>The code for the control:</b>
<pre><code>
&lt;OBJECT
<br>  id=test 
<br>  type="application/x-oleobject" 
<br>  classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"
<br>&gt;
<br>&lt;PARAM name="Command" value="HH Version"&gt;
<br>&lt;/OBJECT&gt;
</pre></code></p>

<p><b>The JavaScript code to specify the text and font variables:</b></p>
<code>
&lt;script&gt;
<br>FontFace="Verdana,8,,bold" 
<br>TopicText="This is an HTML Help pop-up window. This window can display text only."
<br>TopicText2="This is another HTML Help pop-up window."
<br>&lt;/script&gt;
</code>


<p><b>The JavaScript code to invoke the control:</b></p>
<code>
&lt;a href="JavaScript:test.TextPopup (TopicText, FontFace, 10,10,10,10)"&gt; TextPopup Example&lt;/a&gt;
</code>

<h2><a href="showme_mtextpopup.htm">Show Me</a></h2>


<h2>Comments</h2>
<ul>
<li>Colors do not display properly.</li>
<li>You can store text variables in a separate text file with a .js extension.
</li>
</ul>

<br>
<table border="0" cellpadding="0" cellspacing="4">
<tr>
<td valign="top"><a href="ocx_methods.htm"><img src="proced.gif" alt="link to overview topic" border="0"></a>
</td>
<td><a href="ocx_methods.htm">About the HTML Help ActiveX control methods</A>
</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table>


</BODY>
</HTML>
